package de.zainodis.kitchengnome.ui;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import de.zainodis.commons.LogCat;
import de.zainodis.kitchengnome.R;

public class MainMenu extends Activity {

	private static final String TAG = "MainMenu";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setTitle(R.string.main_menu);
		setContentView(R.layout.layout_mainmenu);

		// Override typeface settings
		Button button = (Button) findViewById(R.id.layout_mainmenu_shoppinglist);
		button.setTypeface(Typeface.createFromAsset(getAssets(), FontName.CAPTURE_IT));
		button = (Button) findViewById(R.id.layout_mainmenu_spiceshelve);
		button.setTypeface(Typeface.createFromAsset(getAssets(), FontName.CAPTURE_IT));
		button = (Button) findViewById(R.id.layout_mainmenu_edit_suggestions);
		button.setTypeface(Typeface.createFromAsset(getAssets(), FontName.CAPTURE_IT));

	}

	public void onOpenShoppingList(View originator) {
		LogCat.i(TAG, "Opening shopping list.");
		startActivity(new Intent(this, ShoppingList.class));
	}

	public void onOpenSpiceShelve(View originator) {
		LogCat.i(TAG, "Opening spice shelve.");
		startActivity(new Intent(this, Condiments.class));
	}

	public void onEditSuggestions(View originator) {
		LogCat.i(TAG, "Opening editor for suggestions.");
		startActivity(new Intent(this, EditSuggestions.class));
	}
}
